package com.ycz.springcloud.controller;/*
 @author ycz
 @date 2021-08-24-21:16  
*/

import com.ycz.springcloud.common.Result;
import com.ycz.springcloud.query.BusCustomerQuery;
import com.ycz.springcloud.service.BusCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RequestMapping("/customer")
@RestController
public class CustomerController {

    @Autowired
    private BusCustomerService busCustomerService;

    @RequestMapping("/page.do")
    public Map<String,Object> page(@RequestBody BusCustomerQuery query){

        Map<String,Object> map=new HashMap<>();
        map.put("data",busCustomerService.selectCustomList(query));
        map.put("count",busCustomerService.selectCount(query));
        return map;


    }


}
